<admintpl file="header"/>
<link rel="stylesheet" href="__PUBLIC__/css/jquery.datetimepicker.css">
<link rel="stylesheet" href="__PUBLIC__/css/main.css">
<link rel="stylesheet" href="__PUBLIC__/css/act_info.css">
<script src="__PUBLIC__/js/uploadify/jquery2.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/jquery.form.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/laydate.js"></script>

<style type="text/css">
    .hidden {
        display: none;
    }
</style>
</head>
<body>
<div class="manage">
    <span><a href="{:U('Package/index')}">运营管理</a></span>
</div>

<div class="act_main"><a href="{:U('Package/index')}">运营工具</a>
        <span class="act-nav">
                <a href="{:U('Package/index')}">渠道包管理</a>
        </span>
</div>
<div class="wrap">
    <div class="act_title">
        <div class="act_left">
            <span class="act_all" data-channelId="{$list.ChannelId}" data-type="{$list.Type}"><a href="#" class="rehref" style="color: #000">
                <?php if(!$list['Name']){ ?><?php echo "默认渠道包"; }else{ ?>{$list.Name}<?php } ?></a></span>
        </div>

    </div>

    <div class="text-center act-view">
        <a href="#" data-toggle="modal" data-target="#JActivityeditact" data-editactid="{$list.ChannelId}">>
            <em>编辑渠道包信息</em></a>
    </div>
    <div class="form-horizontal Jpackage">
        <div class="control-group">
            <label class="control-label" style="padding-top: 0px">渠道包：</label>
            <span class="controls"><?php if(!$list['Name']){ ?><?php echo "默认渠道包"; }else{ ?>{$list.Name}<?php } ?></span>
        </div>
        <div class="control-group">
            <label class="control-label " style="padding-top: 0px">有效期：</label>
            <span class="controls"><if condition="$list.Forever eq 0">{$list.ExpirationTimeInfo}</if> {$list.OverExpirationTime}</span>
        </div>

        <!--
        <div class="control-group">
            <label class="control-label " style="padding-top: 0px">渠道包长链接：</label>
            <span class="controls"><a href="{$list.Url.result.url_long}" target="_blank">{$list.Url.result.url_long}</a></span>
        </div>
        -->

        <div class="control-group">
            <label class="control-label " style="padding-top: 0px">渠道包短链接：</label>
            <span class="controls"><a href="{$list.Url.result.url_short}" target="_blank">{$list.Url.result.url_short}</a></span>
        </div>


    </div>


    <div class="act-foot text-center" style="padding-top: 100px">
        <span>渠道包链接 {$list.Url.result.url_short}</span> <span>{$list.UpdateTime}更新</span></span>
    </div>
</div>

<!--edit-->
<div class="modal fade" id="JActivityeditact" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     style="width: 600px; display: none;">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header" style="background-color: #ecf0f1">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myShopLabel"  style="color:black">更新渠道包信息</h4>
            </div>
            <div class="modal-body">
                <div class="form-horizontal Jactadd">
                    <?php if($list['Type']==1){ ?>
                        <div class="control-group">
                            <label class="control-label">渠道包名称</label>
                            <div class="controls">
                                <input type="text" name="Name" class="activityName" placeholder="请添加渠道包信息" maxlength="20"
                                       value="{$list.Name}">
                                <span class="form-required">*</span>
                            </div>
                        </div>
                    <?php } ?>

                    <div class="control-group editBusPic">
                        <label class="control-label">渠道包</label>

                        <div class="controls">
                            <sapn class="packageSite">{$list.Site}</sapn>
                            <div class="packageList text-center"></div>
                            <div class="form-required text-right packageOne"><a href="#" class="updateSite"
                                                                                style="color: red">更新</a></div>
                        </div>
                    </div>

                    <?php if($list['Type']==1){ ?>
                        <div class="control-group">
                            <label class="control-label ">有效期：</label>
                            <div class="controls">
                                <input type="text" name="ActiveTime" id="onlinetime" placeholder="请选择有效时间"
                                       value="<?php if($list['ActiveTime']){ ?><?php echo $list['ActiveTime']; ?><?php } ?>">
                                <span class="form-required">*</span>

                                <input type="checkbox" name="Forever" <?php if($list['Forever']==1){?> checked <?php } ?> value="1">永久
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label ">微信url：</label>

                            <div class="controls">
                                <input type="text" name="WeiXinUrl" placeholder="微信url" value="{$list.WeiXinUrl}">
                                <span class="form-required">*</span>
                            </div>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <div class="modal-footer" style="text-align: center">
                <button type="button" class="btn btn-danger JsaveActivity">保存</button>
            </div>
        </div>
    </div>
</div>


<!-- editbusiness -->


<script type="text/javascript">

    var editPackageUrl = "{:U('Package/editPackage')}";
    $(function () {

        $('#onlinetime').click(function () {
            laydate({elem: '#onlinetime', format: 'YYYY-MM-DD hh:mm:ss', istime: true});
        });


        $('.rehref').click(function () {
            location.reload();
        })
    })
</script>

<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/js/artDialog/artDialog.js"></script>
<script src="__PUBLIC__/js/package.js"></script>
</body>
</html>